package com.ruoyi.system.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 【请填写功能名称】对象 comments
 *
 * @author ruoyi
 * @date 2024-08-26
 */
public class Comments extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 评论id
     */
    private Long commentId;

    /**
     * 评论内容
     */
    @Excel(name = "评论内容")
    private String commentContent;

    /**
     * 评论发布者
     */
    @Excel(name = "评论发布者")
    private String commentPublisher;

    /**
     * 点赞数
     */
    @Excel(name = "点赞数")
    private Long commentLikes;

    /**
     * 父级id
     */
    @Excel(name = "父级id")
    private Long parentId;

    private Long targetArticleId;
    /**
     * 发布时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date commentDate;

    public void setCommentId(Long commentId) {
        this.commentId = commentId;
    }

    public Long getCommentId() {
        return commentId;
    }

    public void setCommentContent(String commentContent) {
        this.commentContent = commentContent;
    }

    public String getCommentContent() {
        return commentContent;
    }

    public void setCommentPublisher(String commentPublisher) {
        this.commentPublisher = commentPublisher;
    }

    public String getCommentPublisher() {
        return commentPublisher;
    }

    public void setCommentLikes(Long commentLikes) {
        this.commentLikes = commentLikes;
    }

    public Long getCommentLikes() {
        return commentLikes;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setCommentDate(Date commentDate) {
        this.commentDate = commentDate;
    }

    public Date getCommentDate() {
        return commentDate;
    }

    public Long getTargetArticleId() {
        return targetArticleId;
    }

    public void setTargetArticleId(Long targetArticleId) {
        this.targetArticleId = targetArticleId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("commentId", getCommentId())
                .append("commentContent", getCommentContent())
                .append("commentPublisher", getCommentPublisher())
                .append("commentLikes", getCommentLikes())
                .append("parentId", getParentId())
                .append("commentDate", getCommentDate())
                .toString();
    }
}
